CC     := gcc
CXX    := g++
LD     := g++
LDFLAGS := -L./tinyxml
CXXFLAGS := -I./tinyxml

OUTPUT := cram
all: cram

#LIBS := tinyxml/tinyxml.o tinyxml/tinystr.o tinyxml/tinyxmlparser.o tinyxml/tinyxmlerror.o 

SRCS := cram.cpp model.cpp

OBJS := $(addsuffix .o,$(basename ${SRCS}))

${OUTPUT}: simulator tinyxml ${OBJS}
	${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}


%.o : %.cpp
	${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@

%.o : %.c
	${CC} -c ${CFLAGS} ${INCS} $< -o $@

dist:
	bash makedistlinux

clean:
	cd ./tinyxml ; make clean
	-rm -f core ${OBJS} ${OUTPUT}

simulator: 
	cd ./simulator ; make

tinyxml: 
	cd ./tinyxml ; make

force_look :
	true
